﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Web;
//using Spring.IO;
//using Spring.Social.Dropbox.Api;
//using Spring.Social.Dropbox.Connect;
//using Spring.Social.OAuth1;

//namespace LeonardoNews.Server
//{
//    public static class DropBox
//    {
//        public static string Uploader(string filename)
//        {
//            var appAuth = new Tuple<string, string>("lstxwgcdd0holii", "42csmw3g4m13irv");
//            var userAuth = new Tuple<string, string>("795v44zszfj50ya", "z2u8b3ewejjrdyun");
//            var dropboxServiceProvider = new DropboxServiceProvider(appAuth.Item1, appAuth.Item2, AccessLevel.AppFolder);
//            var dropbox = dropboxServiceProvider.GetApi(userAuth.Item1, userAuth.Item2);
//            var uploadFileEntry = dropbox.UploadFileAsync(new FileResource(""), filename).Result;
//            var sharedUrl = dropbox.GetMediaLinkAsync(uploadFileEntry.Path).Result;

//            return (sharedUrl.Url + "?dl=1");
//        }
//    }
//}